How to find the integral of cos x